.class Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ConfigurationBroadcastReceiver;
.super Landroid/content/BroadcastReceiver;
.source "ConfigurationBroadcastReceiver.java"

# interfaces
.implements Ljava/lang/Runnable;


# static fields
.field private static final DELAY:I = 0x3e8


# instance fields
.field private final mHandler:Landroid/os/Handler;

.field private mLastOrientation:I

.field private final mMraidView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;


# direct methods
.method constructor <init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;)V
    .locals 1
    .parameter "mraidView"

    .prologue
    .line 58
    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    .line 59
    iput-object p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ConfigurationBroadcastReceiver;->mMraidView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    .line 60
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/burstly/lib/util/Utils;->getOrientation(Landroid/content/Context;)I

    move-result v0

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ConfigurationBroadcastReceiver;->mLastOrientation:I

    .line 61
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ConfigurationBroadcastReceiver;->mHandler:Landroid/os/Handler;

    .line 62
    return-void
.end method


# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .locals 5
    .parameter "context"
    .parameter "intent"

    .prologue
    .line 66
    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v0

    .line 67
    .local v0, action:Ljava/lang/String;
    const-string v2, "android.intent.action.CONFIGURATION_CHANGED"

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 68
    invoke-static {p1}, Lcom/burstly/lib/util/Utils;->getOrientation(Landroid/content/Context;)I

    move-result v1

    .line 69
    .local v1, orientation:I
    iget v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ConfigurationBroadcastReceiver;->mLastOrientation:I

    if-eq v1, v2, :cond_0

    .line 70
    iput v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ConfigurationBroadcastReceiver;->mLastOrientation:I

    .line 71
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ConfigurationBroadcastReceiver;->mHandler:Landroid/os/Handler;

    const-wide/16 v3, 0x3e8

    invoke-virtual {v2, p0, v3, v4}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 74
    .end local v1           #orientation:I
    :cond_0
    return-void
.end method

.method public run()V
    .locals 2

    .prologue
    .line 78
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 79
    .local v0, params:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ConfigurationBroadcastReceiver;->mMraidView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    invoke-virtual {v1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->addScreenSizeValue(Ljava/util/Map;)V

    .line 80
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ConfigurationBroadcastReceiver;->mMraidView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    invoke-virtual {v1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->addOrientationValue(Ljava/util/Map;)V

    .line 81
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ConfigurationBroadcastReceiver;->mMraidView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    invoke-virtual {v1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->addMaxSizeValue(Ljava/util/Map;)V

    .line 82
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ConfigurationBroadcastReceiver;->mMraidView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    invoke-virtual {v1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->fireComplexChangeEvent(Ljava/util/Map;)V

    .line 83
    return-void
.end method
